#!/usr/bin/python
# -*- coding: UTF-8 -*-

import MySQLdb


# 打开数据库连接
db=MySQLdb.connect("localhost","root","123","ed_db", charset='utf8')

cu = db.cursor();

# sql="DELETE FROM EMPLOYEE ";
# cu.execute(sql)
sql2 = """CREATE TABLE EMPLOYEE1 (
         FIRST_NAME  CHAR(20) NOT NULL,
         LAST_NAME  CHAR(20),
         AGE INT,  
         SEX CHAR(1),
         INCOME FLOAT )"""
a=cu.execute(sql2)
if a !='': 
    print "创建表成功"
else:
    print "创建表失败" 
db.close()